<template>
  <!--  入库详情-审核通过 -->
  <div class="app-container">
  <sn-card-with-title>
    <enter-stock-pass-check-title slot="title"/>
    <div slot="content">
      <enter-stock-pass-check-description />
      <enter-stock-pass-check-table :table-data="enterStockPassCheckTableData"/>
    </div>
  </sn-card-with-title>
  </div>
</template>

<script>
import EnterStockPassCheckDescription from "./children/EnterStockPassCheckDescription";
import EnterStockPassCheckTable from "./children/EnterStockPassCheckTable";
import EnterStockPassCheckTitle from "./children/EnterStockPassCheckTitle";

import {getStockByid} from "@/api/drug_manage/drugManage";

export default {
  name: "PutStorageYes",
  components: {
    EnterStockPassCheckDescription,
    EnterStockPassCheckTable,
    EnterStockPassCheckTitle
  },
  data() {
    return {
      enterStockPassCheckTableData:[]
    }
  },
  methods:{
    toGetOneById(id){
      getStockByid(id).then(res => {
        console.log(res);
        this.enterStockPassCheckTableData = res.data;
        this.$set(this.enterStockPassCheckTableData[0], 'id', 1);
      })
    }
  },
  created() {
    this.toGetOneById(this.$route.params.id)
  }
}
</script>

<style scoped>

</style>
